package com.hk.service.impl;

import java.sql.Timestamp;

import org.springframework.stereotype.Service;

import com.hk.commons.LongId;
import com.hk.commons.entity.Duties;
import com.hk.dao.base.impl.BaseServiceImpl;
import com.hk.service.sys.IDuties;

@Service
public class DutiesImpl extends BaseServiceImpl<Duties> implements IDuties {

	@Override
	public Duties findById(Long id) {
		return getById(id);
	}

	@Override
	public Long add(Duties model) {
		Long id = LongId.get();
		model.setId(id);
		
		model.setCreatedts(System.currentTimeMillis());
		super.save(model);
		
		return id;
	}

	@Override
	public Duties delete(Long id) {
		Duties model = new Duties();
		model.setId(id);
		delete(model);
		return model;
	}
}
